import styles from './index.less';
import {Layout} from 'components';
const {Tab} = Layout;
import { Button } from 'antd';
import { connect } from 'dva';
import withRouter from 'umi/withRouter';
import router from 'umi/router';
import Link from 'umi/link';


function goToListPage() {
    router.push('/test');
}

function Home({home,dispatch}){
    const {list}=home
    const refresh=()=>{
        dispatch({
            type:'home/getHome'
        })
    }
    console.log(0)
    return(
        <div className={styles.wrap}>
            <Link to="/test">Link跳转</Link>
            <Button onClick={goToListPage}>函数式跳转</Button>
            <Button onClick={refresh}>刷新</Button>
            <img src={require('assets/yay.jpg')} alt=""/>
            <b className="red">
                无状态
            </b>
        </div>
    )
}
export default withRouter(connect((home)=>(home))(Home));


